<?php
namespace app\api\controller;

use think\Controller;

header('Access-Control-Allow-Origin:*');
// 响应类型
header('Access-Control-Allow-Methods:*');
// 响应头设置
header('Access-Control-Allow-Headers:x-requested-with,content-type');
class Index
{
    public function index()
    {

        if (!($_POST)) {

            return json([
                'code' => 404,
                'msg' => '搞事情鸭....',
            ]);
        }

        return json([
            'Userid' => $_POST['Userid'],
            'overduedate' => 1545104340,
        ]);

    }

}
